#pragma once

#include "windows.h"
#include "WinScopeLock.h"

class cWinMutex
{
public:
	typedef WinScopeLock_T<cWinMutex> ScopeMutex;

	cWinMutex();
	~cWinMutex();

	void lock();
	void lock(long millisec);
	void unlock();

private:
	HANDLE m_mutex;

	cWinMutex(const cWinMutex&);
	cWinMutex& operator = (const cWinMutex&);
};